/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package person;

import java.*;


/**
 *
 * @author Yang Wu
 */
public class Person {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Person p=new Person("a",1);
    }

   private String name;

   private int age;
   

    public Person(String val,int ch){
    this.name=val;
    this.age=ch;
   }





   public String getName(){

      return name;
   }

   public void setName(String val){
      
      this.name=val;
   }

   public int getAge(){

       return age;
   }

   public void setAge(int ch){
       
       this.age=ch;
   }

   public String reverseName(){

      int length = name.length();
		StringBuilder reverse = new StringBuilder();
		for(int i = length; i > 0; --i) {
			char result = name.charAt(i-1);
			reverse.append(result);
		}
		return reverse.toString();
	}
}

